<?php
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/app/prePayment.js',  CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/app/prePaymentList.js',  CClientScript::POS_END);
?>
<div id="left-col">
    <div class="inside">
        
    
    <?php $this->renderPartial('_side');?>
        </div>
</div>
<div id="right-col">
    
    <div class="wrap">
        <div class="container">
<div class="inside">
    
    <h1>
        PrePayment
    </h1>
    <div class="form">

        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'rec-age-form',
            'enableAjaxValidation' => false,
                ));
        ?>



            <?php echo $form->errorSummary($rec); ?>

        <div class="row">
            <?php echo $form->labelEx($rec, 'custno'); ?>
                <?php echo $form->dropDownList($rec, 'custno', Po::model()->getCustomersList()); ?>
                <?php echo $form->error($rec, 'custno'); ?>
            <div class="model-data">
<?php echo $rec->custno; ?>
            </div>
            <br clear="all"/>
            <div class="model-data">

            </div>
            <div class="model-data">
                <span id="customer-name"></span><br/>
                <span id="address"></span><br/>
                <span id="citystatezip"></span>
            </div>
        </div>
        <div class="row">

        </div>
        <div class="row">
            <?php echo $form->labelEx($recleg, 'entrydate'); ?>
            <?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'model' => $recleg,
                'attribute' => 'entrydate',
                'value' => CTimestamp::formatDate('Y-m-d', $recleg->entrydate),
                'options' => array('dateFormat' => 'yy-m-d'),
            ));
            ?>
            <?php echo $form->error($recleg, 'entrydate'); ?>

            <?php
            echo $form->labelEx($recleg, 'paymethod');
            echo $form->dropDownList($recleg, 'paymethod', PaymentMethods::getList());
            echo $form->error($recleg, 'paymethod');
            ?>
        </div>
        <div class="row">
            <?php echo $form->labelEx($rec, 'invoice'); ?>
            <?php echo $form->textField($rec, 'invoice', array('size' => 7, 'maxlength' => 7)); ?>
            <?php echo $form->error($rec, 'invoice'); ?>
        </div>


        <div class="row">
            <?php echo $form->labelEx($rec, 'dept'); ?>
            <?php echo $form->dropDownList($rec, 'dept', Invoice::model()->getDepartments()); ?>
            <?php echo $form->error($rec, 'dept'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($rec, 'jobnumber'); ?>
            <?php echo $form->dropDownList($rec, 'jobnumber', Jobs::getList()); ?>
            <?php echo $form->error($rec, 'jobnumber'); ?>
        </div>


        <div class="row">
            <?php echo $form->labelEx($recleg, 'ckno'); ?>
            <?php echo $form->textField($recleg, 'ckno', array('size' => 12, 'maxlength' => 12)); ?>
            <?php echo $form->error($recleg, 'ckno'); ?>
        </div>


        <div class="row">
            <?php echo $form->labelEx($recleg, 'amount'); ?>
            <?php echo $form->textField($recleg, 'amount', array('size' => 10, 'maxlength' => 10)); ?>
            <?php echo $form->error($recleg, 'amount'); ?>
        </div>










        <div class="row_buttons">
            <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
        </div>

        <?php $this->endWidget(); ?>


    </div><!-- form -->
    <br/>
    <div id="prepayment-list">

    </div>
</div>
        </div>
</div>
    </div>